package com.example.deepai.repository;

import com.example.deepai.model.ChatMessage;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;

import org.springframework.transaction.annotation.Transactional;

public interface ChatMessageRepository extends JpaRepository<ChatMessage, Long> {
    List<ChatMessage> findBySessionIdOrderByTimestampAsc(String sessionId);
    @Transactional
    void deleteBySessionId(String sessionId);
}